package net.sx.minemodule.mvp.model;

import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseModel;

import net.sx.minemodule.mvp.item.ConvertListItem;

/**
 * add shibo.zheng
 * 19/07/05
 * 兑换列表model 后台数据获取成功后调用此类
 */
public class ConvertListModel extends BaseModel<ConvertListItem> {

    /**
     * id : 4                                   //商品ID
     * productSkuId : 33                        //商品SKU ID
     * productId : 4                            //商品ID
     * displayedName : 豆芽                     //商品展示名称
     * picture : mall/images/20190701/1561971399765dAdfpNnZcAKZNkmt7Pd3Hfy2zCPWh43i.png     //商品图片
     * medalNum : 1000000000                    //兑换奖牌数量
     * sort : 1                                 //奖牌排序
     * isShow : false                           //是否已兑换
     */

    private int id;
    private int productSkuId;
    private int productId;
    private String displayedName;
    private String picture;
    private int medalNum;
    private int sort;
    private boolean isShow;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProductSkuId() {
        return productSkuId;
    }

    public void setProductSkuId(int productSkuId) {
        this.productSkuId = productSkuId;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getDisplayedName() {
        return displayedName;
    }

    public void setDisplayedName(String displayedName) {
        this.displayedName = displayedName;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getMedalNum() {
        return String.valueOf(medalNum);
    }

    public void setMedalNum(int medalNum) {
        this.medalNum = medalNum;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String isIsShow() {
        return isShow ? "兑换" : "已兑换";
    }

    public void setIsShow(boolean isShow) {
        this.isShow = isShow;
    }

    @Override
    public ConvertListItem createItem(MultiTypeAdapter adapter) {
        return new ConvertListItem(this);
    }
}
